class Solution
{
public:
    int minSteps(string s, string t)
    {
        vector<int> charCount(26, 0);
        for (char c : s)
        {
            ++charCount[c - 'a'];
        }
        for (char c : t)
        {
            --charCount[c - 'a'];
        }
        int totalDiff = 0;
        for (int diff : charCount)
        {
            totalDiff += abs(diff);
        }
        return totalDiff / 2;
    }
};